<template>
	<view class="sales_detailed">
		<view class="sales_detailed_image">
			<view class="">
				<image v-if="detailed.avatar" :src="util.imageApi+detailed.avatar" mode=""></image>
				<image v-else src="https://s1.ax1x.com/2022/05/14/O6Bj4e.png" mode=""></image>
			</view>
			<view class="">
				<view class="">
					{{detailed.nickName}}
				</view>
				<view class="">
					账号id：{{detailed.memberId}}
				</view>
				<!-- <view class="">
					电话号码：{{detailed.userName}}
				</view> -->
			</view>
		</view>
		<view class="sales_detailed_item">
			<label>自购：</label>
			<span>{{detailed.seflBuy?detailed.seflBuy:0}}</span>
		</view>
		<view class="sales_detailed_item">
			<label>销售业绩：</label>
			<span>{{detailed.groupBuy?detailed.groupBuy:0}}</span>
		</view>
		<view class="sales_detailed_item border_bottom">
			<label>昨日新增业绩：</label>
			<span>{{detailed.lastdayGroupBuy?detailed.lastdayGroupBuy:0}}</span>
		</view>
	</view>
</template>

<script>
	import util from "@/util/index.js"
	export default{
		data(){
			return {
				util:util,
				detailed:{}
			}
		},
		onLoad(option) {
			this.getInit(option.id)
		},
		methods:{
			getInit(id){
				this.$http({
					url:'/member/getPerformanceInfo',
					method:'GET',
					data:{
						memberIdParem:id,
						token:uni.getStorageSync('secretKey')
					}
				}).then(res=>{
					this.detailed = res.data.data
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import './salesDetailed.css';
</style>
